#     Goblinoid: Experience all of MediaGoblin on an Android Device
#     Copyright (C) 2015 Dylan Jeffers 
# 
#     This program is free software: you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
# 
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
# 
#     You should have received a copy of the GNU General Public License
#     along with this program.  If not, see <http://www.gnu.org/licenses/>.


#:import RefreshScrollEffect goblinoid.feed.refreshscrolleffect.RefreshScrollEffect
#:import RecycleView kivy.garden.recycleview.RecycleView
#:import ActivityHeader goblinoid.feed.feedlayout.ActivityHeader
#:import ActivityImage goblinoid.feed.content.ActivityImage
#:import ActivityVideo goblinoid.feed.content.ActivityVideo
#:import ActivityTitle goblinoid.feed.title.ActivityTitle


<RecycleFeed>:
    refresh_request: False
    key_viewclass: 'viewclass'
    key_size: 'height'


<FeedBar@AnchorLayout>:
    id: feed_bar
    anchor_y: 'top'
    size_hint_y: None
    height: sp(30)
    color: [0, 0, 0, 0.1]
    BoxLayout:
        id: b_layout
        canvas.before:
            Color:
                rgba: feed_bar.color if feed_bar.color else [0, 0, 0, 0.1]
            Rectangle:
                pos: self.pos
                size: self.size
        padding: [0,0,sp(15),0]
        BoxLayout:
        Image:
            size_hint: None, None
            height: sp(30)
            width: sp(100)
            valign: 'middle'
            source: 'images/mediagoblin_large.png'
            allow_stretch: True
        BoxLayout:


<FeedScreen>:
    rv_height: rv.old_height
    BoxLayout:
        orientation: 'vertical'
        FeedBar:
            id: feed_bar
        RecycleFeed: 
            id: rv
            effect_y: RefreshScrollEffect(refresh_delegate=root)
            animation_delegate: root
            feed_service: root.feed_service
